#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	char s[100][100] = { 0 };
	int k = 0;
	while (scanf("%s", s[k]) != EOF)
	{
		k++;
	}
	int i = 0;
	for (i = k - 1; i >= 0; i--)
	{
		printf("%s ", s[i]);
	}
}
